package com.miplus.ccrm.report.controller;
import com.miplus.ccrm.common.R;
import com.miplus.ccrm.report.controller.dto.ivr.InGroupDetailDTO;
import com.miplus.ccrm.report.controller.dto.ivr.inGroupStatisticsDTO;
import com.miplus.ccrm.report.controller.vo.ivr.InGroupDetailVO;
import com.miplus.ccrm.report.controller.vo.ivr.InGroupStatisticsVO;
import com.miplus.ccrm.report.controller.vo.ivr.VisitGroupStatisticsVO;
import com.miplus.ccrm.report.service.cti.TRecorderService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
 * IVR管理
 */
@RestController
@RequestMapping("/ivr")
public class IvrController {
    @Resource
    private TRecorderService tRecorderService;


    /**
     * 进线组坐席监控统计
     */
    @PostMapping("inGroupStatistics")
    public R<InGroupStatisticsVO> inGroupStatistics(@RequestBody inGroupStatisticsDTO dto) {
        return R.Success(tRecorderService.inGroupStatistics(dto.getWorkStartTime(), dto.getWorkEndTime()));
    }
    /**
     * 外呼组坐席监控统计
     */
    @PostMapping("visitGroupStatistics")
    public R<VisitGroupStatisticsVO> visitGroupStatistics() {
        return R.Success(tRecorderService.visitGroupStatistics());
    }
    /**
     * 进线组坐席监控明细
     */
    @PostMapping("inGroupDetail")
    public R<List<InGroupDetailVO>> inGroupDetail(@RequestBody InGroupDetailDTO dto) {
        return R.Success(tRecorderService.inGroupDetail(dto));
    }


}
